﻿// -----------------------------------------------------------------------
//  <copyright file="ServiceCollectionExtensions.cs" company="LiuliuSoft">
//      Copyright (c) 2025 66SOFT. All rights reserved.
//  </copyright>
//  <site>https://ifs.66soft.net</site>
//  <last-editor>郭明锋</last-editor>
//  <last-date>2025-09-28 00:09</last-date>
// -----------------------------------------------------------------------

using Microsoft.AspNetCore.Hosting;

namespace DaprPlus.AspNetCore.Extensions;

public static class ServiceCollectionExtensions
{
    /// <summary>
    /// 获取<see cref="IWebHostEnvironment"/>环境信息
    /// </summary>
    public static IWebHostEnvironment GetWebHostEnvironment(this IServiceCollection services)
    {
        return services.GetSingletonInstance<IWebHostEnvironment>();
    }
}